package main.java.study.step02;

import java.util.ArrayList;
import java.util.List;

/**
 * @author liuwenxiu
 * @Description:
 * @date 2022-7-13 11:26
 */
public class InitializationDemo {
    public List<String> arrList;

    public InitializationDemo() {
        this.arrList.add("tom");
        System.out.println("执行构造方法");
    }

    {
        arrList = new ArrayList<>();
        arrList.add("sakura");
        arrList.add("lucy");
        System.out.println("执行初始化代码块");
    }

    public static void main(String[] args) {
        System.out.println(new InitializationDemo().arrList);
        
    }
}

